﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="/xiaozu/css/main.css" rel="stylesheet" type="text/css" />
    <script>
        function toSubmit(){
            let formData = new FormData($("#myForm")[0]);
            $.ajax({
                type:'post',
                data:formData,
                url:'${pageContext.request.contextPath }/travelAgency/modify.do',
                async: false,cache: false,contentType: false,processData: false,
                success:function(msg){
                    // opener.layer.close('myAdd')
                    // console.log(opener.openlayer)
                    window.parent.layer.closeAll()
                }
            })
        }
    </script>
</head>

<body>
<h1 class="h1_style"><i class="i_h1"></i>旅行社信息</h1>
<form id="myForm" action="${pageContext.request.contextPath }/travelAgency/modify.do" method="post" enctype="multipart/form-data">
    <div class="div_left">


        <p class="form_p"><label class="form_label">编号：</label>
            <input name="tt_travel_Id" value="${travel1.tt_travel_Id }"  type="text" class="form_input readonly" readonly="readonly"><i class="i_start"></i><a class="a_note">自动生成</a> </p>
        <p class="form_p"><label class="form_label">旅行社名称：</label><input value="${travel1.tt_travel_Name }" name="tt_travel_Name" type="text" class="form_input " minlength="2"  required ><i class="i_start"></i> </p>
        <p class="form_p"><label class="form_label">类型：</label>
            <select name="tt_travel_Type"  value="${travel1.tt_travel_Type }"class="form_select" style="padding-left: 1%;">
                <option value="1" <c:if test="${tt_travel_Type == 1}">selected="selected"</c:if>>国内社</option>
                <option value="2" <c:if test="${tt_travel_Type == 2}">selected="selected"</c:if>>国外社</option>
                <option>无</option>
            </select>
        </p>
        <p class="form_p"><label class="form_label">责任人：</label>
            <input name="tt_travel_Person" value="${travel1.tt_travel_Person }" type="text" class="form_input " minlength="2"  required ><i class="i_start"></i></p>
        <p class="form_p"><label class="form_label">责任人身份证号码：</label>
            <input name="tt_travel_IDcard" value="${travel1.tt_travel_IDcard }" type="text" class="form_input " minlength="2"  required ><i class="i_start"></i></p>
        <p class="form_p"><label class="form_label">联系电话：</label>
            <input name="tt_travel_Phone" value="${travel1.tt_travel_Phone }" type="text" class="form_input " minlength="2"  required ><i class="i_start"></i></p>
        <p class="form_p"><label class="form_label">详细地址：</label>
            <input  name="tt_travel_Adress" value="${travel1.tt_travel_Adress }" type="text" class="form_input " minlength="2"  required ><i class="i_start"></i></p>
        <p class="form_p"><label class="form_label">建立时间：</label>
            <input name="tt_travel_Createtime1" value="${travel1.tt_travel_Createtime }"  class="form_date" id="demo"/></p>
        <p class="form_p"><label class="form_label a_area">备注：</label>
            <textarea name="tt_travel_Remarks"  value="${travel1.tt_travel_Remarks }" class="text_area1" ></textarea></p>
        <div class="clear"></div>



        <div class="div_right">
            <p class="p_padd"><img src="/xiaozu/image/ph_list.png"/></p>
            <p class="p_padd"><input name="myImage" value="${travel1.tt_travel_Picture }" type="file" class="file"/></p>
            <p class="p_text1">上传图片格式为：jpg,png,tif,pneg,tiff格式。</p>
        </div>
        <div class="clear"></div>
        <p class="but_p"><input type="button" value="保存" onclick="toSubmit()" class="but_save"/>
            <input type="button" value="取消" class="but_close" id="close"> </p>

    </div>
</form>
<script src="/xiaozu/js/jquery.js"></script>

<script src="/xiaozu/js/date/js/laydate.js"></script>
<script src="/xiaozu/js/jquery-validation-1.14.0/dist/jquery.validate.min.js" charset="utf-8"></script>
<script src="/xiaozu/js/jquery-validation-1.14.0/dist/localization/messages_zh.js" charset="utf-8"></script>
<script>
    !function () {
        laydate.skin('danlan'); //
        laydate({ elem: '#demo' });
        laydate({ elem: '#demo1' }); //
    } ();

</script>
<script >


</script>
</body>
</html>
